package com.ido.admin.api.controller;

import com.ido.admin.api.entity.TbProject;
import com.ido.admin.api.service.TbProjectService;
import org.hswebframework.web.commons.entity.param.QueryParamEntity;
import org.hswebframework.web.controller.SimpleGenericEntityController;
import org.hswebframework.web.controller.message.ResponseMessage;
import org.hswebframework.web.service.CrudService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/project")
public class TbProjectController implements SimpleGenericEntityController<TbProject, String, QueryParamEntity> {

    private TbProjectService cCategoryService;

    @Autowired
    public TbProjectController(TbProjectService cCategoryService) {
        this.cCategoryService = cCategoryService;
    }

    @Override
    public CrudService<TbProject, String> getService() {
        return cCategoryService;
    }


    @PutMapping("/test")
    public ResponseMessage<Void> test() {
        cCategoryService.select();

        return ResponseMessage.ok();
    }

}
